<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="app">
        <!-- 闪烁问题 -->
        <div v-cloak>
            {{msg}}
        </div>
        <!-- v-text没有闪烁问题，会覆盖掉元素中原本的值 -->
        <div v-text="msg1">1212</div>
        <div v-html="msg1"></div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 123,
                msg1: "<h1>123456789</h1>"
            },
            methods: {}
        });
    </script>
</body>

</html>